<!--提交的资料-->

<template>
    <div class="form-info">
        <my-table :data="formList">
            <el-table-column 
                label="资料名称" 
                width="160"
                prop="label_name"
            ></el-table-column>

            <el-table-column label="资料类型" width="100" prop="label_type"></el-table-column>

            <el-table-column 
            label="用户提交内容" 
            min-width="160"
            >
                <template v-slot="{row}">
                    <template v-if="row.label_type === 'input'">
                        {{row.label_value}}
                    </template>

                    <template v-if="row.label_type === 'file' && row.label_value">
                        <my-upload :file-guid="row.label_value" readonly single></my-upload>
                    </template>
                </template>
            </el-table-column>

            <el-table-column label="审核状态" min-width="100">
                <template v-slot="{row}">
                    <my-tag v-if="row.shbj === '1'" type="primary">待完善</my-tag>
                    <my-tag v-if="row.shbj === '3'" type="danger">退回：{{row.reason}}</my-tag>
                    <my-tag v-if="row.shbj === '9'" type="success">通过</my-tag>
                </template>
            </el-table-column>
            </my-table>
    </div>
</template>


<script>
export default {
    props: {
        data: {
            type: Object,
            default: () => ({}),
        },
    },
    data() {
        return {
            formList: [],
        };
    },
    methods: {
        queryData() {
            this.$get(`${this.$store.state.api.webUrl}/allcustom/alldetail.json`, {
                guid: this.data.guid,
            }, data => {
                this.formList = data;
            });
        },
    },
    mounted() {
        this.queryData();
    },
};
</script>

<style lang="scss" scoped>
    @import '@css/var.scss';
    
</style>